package com.netease.spring.knight;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import com.netease.spring.exceptions.QuestException;

public class Main {
	public static void main(String[] args) throws QuestException {
		ClassPathResource resource = new ClassPathResource("knight.xml");
		BeanFactory factory = new XmlBeanFactory(resource);
		Knight knight = (Knight) factory.getBean("knight");
		knight.embarkQuest();
	}
}
